
<html>
<head>
  <link rel="shortcut icon" type="image/png" href="/py.png" />
  <link rel="stylesheet" href="/controller.css" />
  <title> CDNA Controller <title>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  <script src="/orbited/JSON.js"></script>   
  <script src="/orbited/Orbited.js"></script>
  <script>var TCPSocket = Orbited.TCPSocket;</script>  
  <script src="/orbited/protocols/stomp/stomp.js"></script>
  <script src="/controller.js"></script>
</head>
<body>
  <div id=header>Welcome to the controller!</div>  
  <div class=first-row>
    <div class=first-column>
      <fieldset>
        <legend> Run a peer </legend>
        <form action="/" >      
          <input type="hidden" name=method value=run_peer>
          <table>                  
                    
              <tr>          
                <td>rs_host : </td><td> <input type=text value="127.0.0.1" name=rs_host></td>          
              </tr>           
              <tr>          
                <td>tracker_port : </td><td> <input type=text value="7001" name=tracker_port></td>          
              </tr>           
              <tr>          
                <td>http_port : </td><td> <input type=text value="2020" name=http_port></td>          
              </tr>           
              <tr>          
                <td>name : </td><td> <input type=text value="" name=name></td>          
              </tr>           
              <tr>          
                <td>external_ip : </td><td> <input type=text value="127.0.0.1" name=external_ip></td>          
              </tr>           
              <tr>          
                <td>rpc_host : </td><td> <input type=text value="0.0.0.0" name=rpc_host></td>          
              </tr>           
              <tr>          
                <td>rs_port : </td><td> <input type=text value="5001" name=rs_port></td>          
              </tr>           
              <tr>          
                <td>tracker_host : </td><td> <input type=text value="127.0.0.1" name=tracker_host></td>          
              </tr>           
              <tr>          
                <td>http_host : </td><td> <input type=text value="0.0.0.0" name=http_host></td>          
              </tr>           
              <tr>          
                <td>external_port : </td><td> <input type=text value="6001" name=external_port></td>          
              </tr>           
              <tr>          
                <td>rpc_port : </td><td> <input type=text value="6001" name=rpc_port></td>          
              </tr>           
          </table>
          <input type="button" value="run"  >
        </form>
      </fieldset>
    </div> <!-- endo of first -->
    <div class=column>
      <fieldset>
        <legend> Run a Recipe Server </legend>
        <form action="/" >      
          <input type="hidden" name=method value=run_recipe_server>
          <table>
            
              <tr>          
                <td>http_port : </td><td> <input type=text value="1010" name=http_port></td>          
              </tr>           
              <tr>          
                <td>external_ip : </td><td> <input type=text value="127.0.0.1" name=external_ip></td>          
              </tr>           
              <tr>          
                <td>rpc_host : </td><td> <input type=text value="0.0.0.0" name=rpc_host></td>          
              </tr>           
              <tr>          
                <td>http_host : </td><td> <input type=text value="0.0.0.0" name=http_host></td>          
              </tr>           
              <tr>          
                <td>external_port : </td><td> <input type=text value="5001" name=external_port></td>          
              </tr>           
              <tr>          
                <td>rpc_port : </td><td> <input type=text value="5001" name=rpc_port></td>          
              </tr>           
          </table>
          <input type="button" value="run" >
        </form>
      </fieldset>
    </div> <!--end of second-->
    <div class=column>
      <fieldset>
        <legend> Run a Tracker </legend>
        <form action="/" >      
          <input type="hidden" name=method value=run_tracker>
          <table>
            
              <tr>          
                <td>http_port : </td><td> <input type=text value="3030" name=http_port></td>          
              </tr>           
              <tr>          
                <td>external_ip : </td><td> <input type=text value="127.0.0.1" name=external_ip></td>          
              </tr>           
              <tr>          
                <td>rpc_host : </td><td> <input type=text value="0.0.0.0" name=rpc_host></td>          
              </tr>           
              <tr>          
                <td>http_host : </td><td> <input type=text value="0.0.0.0" name=http_host></td>          
              </tr>           
              <tr>          
                <td>external_port : </td><td> <input type=text value="7001" name=external_port></td>          
              </tr>           
              <tr>          
                <td>rpc_port : </td><td> <input type=text value="7001" name=rpc_port></td>          
              </tr>           
          </table>
          <input type="button" value="run" >
        </form>
      </fieldset>
    </div><!-- end of third-->
    <div class=last-column>
      <fieldset>
        <legend> Run a Monitor </legend>
        <form action="/" >      
          <input type="hidden" name=method value=run_monitor>
          <table>
            
              <tr>          
                <td>http_port : </td><td> <input type=text value="4040" name=http_port></td>          
              </tr>           
              <tr>          
                <td>external_ip : </td><td> <input type=text value="127.0.0.1" name=external_ip></td>          
              </tr>           
              <tr>          
                <td>rpc_host : </td><td> <input type=text value="" name=rpc_host></td>          
              </tr>           
              <tr>          
                <td>http_host : </td><td> <input type=text value="" name=http_host></td>          
              </tr>           
              <tr>          
                <td>external_port : </td><td> <input type=text value="8001" name=external_port></td>          
              </tr>           
              <tr>          
                <td>rpc_port : </td><td> <input type=text value="8001" name=rpc_port></td>          
              </tr>           
          </table>
          <input type="button" value="run"  >
        </form>
      </fieldset>
    </div> <!-- end of fourth-->
  </div> <!-- end of upper-->
  <div class=second-row>
    <div class=first-column>
      <fieldset>
        <legend> Current Peers </legend>
        <div id=peers>
          
        </div>    
      </fieldset>
    </div>
    <div class=column>
      <fieldset>
        <legend> Current Recipe Servers </legend>
        <div id=recipe_servers>          
        </div>    
      </fieldset>
    </div>
    <div class=column>
      <fieldset>
        <legend> Current Trackers </legend>
        <div id=trackers>
          
        </div>    
      </fieldset>
    </div>
    <div class=last-column>
      <fieldset>
        <legend> Current Monitors </legend>
        <div id=monitors>
          
        </div>    
      </fieldset>
    </div>
  </div> <!-- end of row-->
  <div class=third-row>
    <div id=log>
    
    </div>
  </div> <!-- end of row-->
</body>
</html>
